// @Date         2021-12-09
// @Author       Aaron Zhang
// @Description
// @FileName      const.go

package api_error

import (
	"time"
)

//常用返回
var (
	ResponseDataNotFound        = NewApiError(ErrorCodeDataNotFound)
	ResponseSuccess             = NewApiError(ErrorCodeSuccess)
	ResponseEmptyToken          = NewApiError(ErrorCodeEmptyToken)
	ResponseInvalidToken        = NewApiError(ErrCodeInvalidToken)
	ResponseParamError          = NewApiError(ErrCodeParamError)
	ResponseGetTokenFail        = NewApiError(ErrCodeGetTokenFail)
	ResponseTokenExpire         = NewApiError(ErrCodeTokenExpire)
	ResponseIntervalServerError = NewApiError(ErrCodeIntervalServerError)
)

//jwt token
const (
	TokenExpireDuration = time.Hour * 2
	TokenSecret         = "this is a secret"
)

//  从Token内读取信息的关键key
const (
	AuthUserNameKey = "userName"
	AuthUserIdKey   = "userId"
)
